package com.zhijiaoyun.dao;

import com.zhijiaoyun.dao.core.IBaseDao;
import com.zhijiaoyun.model.Authority;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface IAuthorityDao extends IBaseDao<Authority> {

    /**
     * get by name
     *
     * @param name
     * @return
     */
    Authority selectByName(String name);

    /**
     * get by name not id
     *
     * @param authorityId
     * @param name
     * @return
     */
    Authority selectByNameNotAuthorityId(@Param("authorityId") Long authorityId, @Param("name") String name);

    /**
     * get by params
     *
     * @param name
     * @return
     */
    List<Authority> selectByParams(@Param("name") String name);

    /**
     * get name by id
     *
     * @param authorityId
     * @return
     */
    String selectNameById(Long authorityId);

    /**
     * get by adminId
     *
     * @param adminId
     * @return
     */
    Authority selectByAdminId(long adminId);
}